import java.util.Scanner;


public class Atividade18 {
	public static void main(String arg[]){
		Scanner digitar = new Scanner(System.in);
		int num[]= new int[10];
		for (int i=0;i<10;i++){
			num[i]=digitar.nextInt();
		}
		for (int i=0;i<10;i++){
			if (num[i]>7){		
		System.out.println(num[i]);
			}
		}
	}

}